#include<iostream>
#include<cmath>
using namespace std;
bool Is_Prime(long long n)
{
	for (int i = 2; i <= sqrt(n); i++)
	{
		if (n % i == 0) {
			return false;
		}
	}
	return true;
}
int main()
{
	long long n;
	cin >> n;
	long long sum = n;
	n /= 10;
	while (n)
	{
		sum = sum * 10 + n % 10;
		n /= 10;
	}
	if (Is_Prime(sum)) {
		cout << "prime" << endl;
	}
	else {
		cout << "noprime" << endl;
	}
	return 0;
}